<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@include file="/pages/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
	<title>广东工业大学招生办</title>
	<link rel="stylesheet" type="text/css" href="${ctx }/css/reset.css" />
	<link rel="stylesheet" type="text/css" href="${ctx }/css/common.css" />
	<link rel="stylesheet" type="text/css" href="${ctx }/css/system.css" />
	<script type="text/javascript" src="${ctx }/js/jquery.min.js"></script>
    <script type="text/javascript">
	function checkLogin(){
		var sfz = $("#userIdentify").attr("value");
		var pwd = $("#userPassword").val();
		var msg = $("#msg").val();
		if(sfz =="" || sfz.length < 18) 
		{
			$(".validateTips").html("请输入18位身份证号码");
			return false;
		}
		$.post("${ctx }/base/examinee!checkLogin.action", {userIdentify:sfz, userPassword:pwd}, function(text){
			$("#msg").val(text);
			if(msg.indexOf("login")==-1){
				$(".validateTips").html(msg);
				return false;
			
			}else if(pwd==""){
				$(".validateTips").html("密码不能为空");
				return false;
			}else{
				msg = msg.substr(5);
				$("#id").val(msg);
				$(".validateTips").html("");
				window.location.href="${ctx }/base/examinee!input.action?id="+$("#id").val();
				return true;
			}
		});
		 
	}
	function esc(){
		window.location.href="${ctx }/index.html";
	}
	function reg(){
		window.location.href="${ctx}/base/examinee!register.action";
	}
	
</script>

  </head>

<body onload="document.forms.playerLogin.userIdentify.focus()">
	<div class="wrapper">
		<div class="center-content auto rel">
			<div class="center-content-title f16"><h1 class="rel">广工大<s:property value="endTime.substring(0,4)"/>年高水平运动员报名系统——系统登录</h1></div>
			
			<div class="center-content-txt f14">
				<div class="validateTips tc pt20"></div>
				<form name="playerLogin" id="playerLogin"  method="post">
					<input type="hidden" name="msg" id="msg"/>
					<input type="hidden" name="id" id="id"/>
					<table class="log mt20 tc auto">
						<tr><td>身份证号：</td>
							<td><input type="text" name="userIdentify" id="userIdentify" class="" maxlength="18"/></td></tr>
						<tr><td>密码：</td>
							<td><input type="password" name="userPassword" id="userPassword"  class="" /></td></tr>
					</table>				
					<p class="tips ml20">请输入身份证号码及密码登录系统，已注册用户请完善个人资料，尚未注册的新用户请点击“注册”按钮。</p>
					<p class="tips ml20 mb20">报名时间已于${endTime}截止。</p>
					<button type="button" class="r button mr10" onclick="esc()"><span>退出</span></button>			
					<button type="button" class="r button mr10 mb20" onclick="reg()"><span>注册</span></button>	
					<button type="button" class="r button mr10" onclick="return checkLogin();"><span>登录</span></button>	
				</form>
				<div class="clearfix"></div>
			</div>
		</div>
	</div>
</body>
</html>
